package com.ibm.psbc.cloud.common.contextcarrier;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;


public class BeanFactoryUtils implements ApplicationContextAware{
	private static ApplicationContext applicationContext;
	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		BeanFactoryUtils.applicationContext = applicationContext;
	}
	public static <T> T getBean(Class<T> clz) {
		return applicationContext.getBean(clz);
	}
}
